package ai.people.core.grpc.lib.key.account;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 */
@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 1.42.0)",
    comments = "Source: keyaccount/key_account.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class KeyAccountRpcServiceGrpc {

  private KeyAccountRpcServiceGrpc() {}

  public static final String SERVICE_NAME = "key.account.KeyAccountRpcService";

  // Static method descriptors that strictly reflect the proto.
  private static volatile io.grpc.MethodDescriptor<ai.people.core.grpc.lib.key.account.KeyAccount,
      com.google.protobuf.BoolValue> getSave2GraphMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "save2Graph",
      requestType = ai.people.core.grpc.lib.key.account.KeyAccount.class,
      responseType = com.google.protobuf.BoolValue.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor<ai.people.core.grpc.lib.key.account.KeyAccount,
      com.google.protobuf.BoolValue> getSave2GraphMethod() {
    io.grpc.MethodDescriptor<ai.people.core.grpc.lib.key.account.KeyAccount, com.google.protobuf.BoolValue> getSave2GraphMethod;
    if ((getSave2GraphMethod = KeyAccountRpcServiceGrpc.getSave2GraphMethod) == null) {
      synchronized (KeyAccountRpcServiceGrpc.class) {
        if ((getSave2GraphMethod = KeyAccountRpcServiceGrpc.getSave2GraphMethod) == null) {
          KeyAccountRpcServiceGrpc.getSave2GraphMethod = getSave2GraphMethod =
              io.grpc.MethodDescriptor.<ai.people.core.grpc.lib.key.account.KeyAccount, com.google.protobuf.BoolValue>newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "save2Graph"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  ai.people.core.grpc.lib.key.account.KeyAccount.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.google.protobuf.BoolValue.getDefaultInstance()))
              .setSchemaDescriptor(new KeyAccountRpcServiceMethodDescriptorSupplier("save2Graph"))
              .build();
        }
      }
    }
    return getSave2GraphMethod;
  }

  private static volatile io.grpc.MethodDescriptor<ai.people.core.grpc.lib.key.account.KeyAccount,
      com.google.protobuf.BoolValue> getDelGraphMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "delGraph",
      requestType = ai.people.core.grpc.lib.key.account.KeyAccount.class,
      responseType = com.google.protobuf.BoolValue.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor<ai.people.core.grpc.lib.key.account.KeyAccount,
      com.google.protobuf.BoolValue> getDelGraphMethod() {
    io.grpc.MethodDescriptor<ai.people.core.grpc.lib.key.account.KeyAccount, com.google.protobuf.BoolValue> getDelGraphMethod;
    if ((getDelGraphMethod = KeyAccountRpcServiceGrpc.getDelGraphMethod) == null) {
      synchronized (KeyAccountRpcServiceGrpc.class) {
        if ((getDelGraphMethod = KeyAccountRpcServiceGrpc.getDelGraphMethod) == null) {
          KeyAccountRpcServiceGrpc.getDelGraphMethod = getDelGraphMethod =
              io.grpc.MethodDescriptor.<ai.people.core.grpc.lib.key.account.KeyAccount, com.google.protobuf.BoolValue>newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "delGraph"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  ai.people.core.grpc.lib.key.account.KeyAccount.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.google.protobuf.BoolValue.getDefaultInstance()))
              .setSchemaDescriptor(new KeyAccountRpcServiceMethodDescriptorSupplier("delGraph"))
              .build();
        }
      }
    }
    return getDelGraphMethod;
  }

  /**
   * Creates a new async stub that supports all call types for the service
   */
  public static KeyAccountRpcServiceStub newStub(io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<KeyAccountRpcServiceStub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<KeyAccountRpcServiceStub>() {
        @java.lang.Override
        public KeyAccountRpcServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new KeyAccountRpcServiceStub(channel, callOptions);
        }
      };
    return KeyAccountRpcServiceStub.newStub(factory, channel);
  }

  /**
   * Creates a new blocking-style stub that supports unary and streaming output calls on the service
   */
  public static KeyAccountRpcServiceBlockingStub newBlockingStub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<KeyAccountRpcServiceBlockingStub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<KeyAccountRpcServiceBlockingStub>() {
        @java.lang.Override
        public KeyAccountRpcServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new KeyAccountRpcServiceBlockingStub(channel, callOptions);
        }
      };
    return KeyAccountRpcServiceBlockingStub.newStub(factory, channel);
  }

  /**
   * Creates a new ListenableFuture-style stub that supports unary calls on the service
   */
  public static KeyAccountRpcServiceFutureStub newFutureStub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<KeyAccountRpcServiceFutureStub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<KeyAccountRpcServiceFutureStub>() {
        @java.lang.Override
        public KeyAccountRpcServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new KeyAccountRpcServiceFutureStub(channel, callOptions);
        }
      };
    return KeyAccountRpcServiceFutureStub.newStub(factory, channel);
  }

  /**
   */
  public static abstract class KeyAccountRpcServiceImplBase implements io.grpc.BindableService {

    /**
     * <pre>
     *保存图服务
     * </pre>
     */
    public void save2Graph(ai.people.core.grpc.lib.key.account.KeyAccount request,
        io.grpc.stub.StreamObserver<com.google.protobuf.BoolValue> responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSave2GraphMethod(), responseObserver);
    }

    /**
     * <pre>
     *删除图服务
     * </pre>
     */
    public void delGraph(ai.people.core.grpc.lib.key.account.KeyAccount request,
        io.grpc.stub.StreamObserver<com.google.protobuf.BoolValue> responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDelGraphMethod(), responseObserver);
    }

    @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
      return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
          .addMethod(
            getSave2GraphMethod(),
            io.grpc.stub.ServerCalls.asyncUnaryCall(
              new MethodHandlers<
                ai.people.core.grpc.lib.key.account.KeyAccount,
                com.google.protobuf.BoolValue>(
                  this, METHODID_SAVE2GRAPH)))
          .addMethod(
            getDelGraphMethod(),
            io.grpc.stub.ServerCalls.asyncUnaryCall(
              new MethodHandlers<
                ai.people.core.grpc.lib.key.account.KeyAccount,
                com.google.protobuf.BoolValue>(
                  this, METHODID_DEL_GRAPH)))
          .build();
    }
  }

  /**
   */
  public static final class KeyAccountRpcServiceStub extends io.grpc.stub.AbstractAsyncStub<KeyAccountRpcServiceStub> {
    private KeyAccountRpcServiceStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected KeyAccountRpcServiceStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new KeyAccountRpcServiceStub(channel, callOptions);
    }

    /**
     * <pre>
     *保存图服务
     * </pre>
     */
    public void save2Graph(ai.people.core.grpc.lib.key.account.KeyAccount request,
        io.grpc.stub.StreamObserver<com.google.protobuf.BoolValue> responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getSave2GraphMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     * <pre>
     *删除图服务
     * </pre>
     */
    public void delGraph(ai.people.core.grpc.lib.key.account.KeyAccount request,
        io.grpc.stub.StreamObserver<com.google.protobuf.BoolValue> responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getDelGraphMethod(), getCallOptions()), request, responseObserver);
    }
  }

  /**
   */
  public static final class KeyAccountRpcServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub<KeyAccountRpcServiceBlockingStub> {
    private KeyAccountRpcServiceBlockingStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected KeyAccountRpcServiceBlockingStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new KeyAccountRpcServiceBlockingStub(channel, callOptions);
    }

    /**
     * <pre>
     *保存图服务
     * </pre>
     */
    public com.google.protobuf.BoolValue save2Graph(ai.people.core.grpc.lib.key.account.KeyAccount request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getSave2GraphMethod(), getCallOptions(), request);
    }

    /**
     * <pre>
     *删除图服务
     * </pre>
     */
    public com.google.protobuf.BoolValue delGraph(ai.people.core.grpc.lib.key.account.KeyAccount request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getDelGraphMethod(), getCallOptions(), request);
    }
  }

  /**
   */
  public static final class KeyAccountRpcServiceFutureStub extends io.grpc.stub.AbstractFutureStub<KeyAccountRpcServiceFutureStub> {
    private KeyAccountRpcServiceFutureStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected KeyAccountRpcServiceFutureStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new KeyAccountRpcServiceFutureStub(channel, callOptions);
    }

    /**
     * <pre>
     *保存图服务
     * </pre>
     */
    public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.BoolValue> save2Graph(
        ai.people.core.grpc.lib.key.account.KeyAccount request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getSave2GraphMethod(), getCallOptions()), request);
    }

    /**
     * <pre>
     *删除图服务
     * </pre>
     */
    public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.BoolValue> delGraph(
        ai.people.core.grpc.lib.key.account.KeyAccount request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getDelGraphMethod(), getCallOptions()), request);
    }
  }

  private static final int METHODID_SAVE2GRAPH = 0;
  private static final int METHODID_DEL_GRAPH = 1;

  private static final class MethodHandlers<Req, Resp> implements
      io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
    private final KeyAccountRpcServiceImplBase serviceImpl;
    private final int methodId;

    MethodHandlers(KeyAccountRpcServiceImplBase serviceImpl, int methodId) {
      this.serviceImpl = serviceImpl;
      this.methodId = methodId;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("unchecked")
    public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
      switch (methodId) {
        case METHODID_SAVE2GRAPH:
          serviceImpl.save2Graph((ai.people.core.grpc.lib.key.account.KeyAccount) request,
              (io.grpc.stub.StreamObserver<com.google.protobuf.BoolValue>) responseObserver);
          break;
        case METHODID_DEL_GRAPH:
          serviceImpl.delGraph((ai.people.core.grpc.lib.key.account.KeyAccount) request,
              (io.grpc.stub.StreamObserver<com.google.protobuf.BoolValue>) responseObserver);
          break;
        default:
          throw new AssertionError();
      }
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("unchecked")
    public io.grpc.stub.StreamObserver<Req> invoke(
        io.grpc.stub.StreamObserver<Resp> responseObserver) {
      switch (methodId) {
        default:
          throw new AssertionError();
      }
    }
  }

  private static abstract class KeyAccountRpcServiceBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
    KeyAccountRpcServiceBaseDescriptorSupplier() {}

    @java.lang.Override
    public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
      return ai.people.core.grpc.lib.key.account.KeyAccountOuterClass.getDescriptor();
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
      return getFileDescriptor().findServiceByName("KeyAccountRpcService");
    }
  }

  private static final class KeyAccountRpcServiceFileDescriptorSupplier
      extends KeyAccountRpcServiceBaseDescriptorSupplier {
    KeyAccountRpcServiceFileDescriptorSupplier() {}
  }

  private static final class KeyAccountRpcServiceMethodDescriptorSupplier
      extends KeyAccountRpcServiceBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
    private final String methodName;

    KeyAccountRpcServiceMethodDescriptorSupplier(String methodName) {
      this.methodName = methodName;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
      return getServiceDescriptor().findMethodByName(methodName);
    }
  }

  private static volatile io.grpc.ServiceDescriptor serviceDescriptor;

  public static io.grpc.ServiceDescriptor getServiceDescriptor() {
    io.grpc.ServiceDescriptor result = serviceDescriptor;
    if (result == null) {
      synchronized (KeyAccountRpcServiceGrpc.class) {
        result = serviceDescriptor;
        if (result == null) {
          serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
              .setSchemaDescriptor(new KeyAccountRpcServiceFileDescriptorSupplier())
              .addMethod(getSave2GraphMethod())
              .addMethod(getDelGraphMethod())
              .build();
        }
      }
    }
    return result;
  }
}
